package program02;

/**
 * @version 1.0
 * @since:
 * @ClassName:ChessBoard
 * @author: Li Jiahui
 * @date: 2021-01-02 21:43
 */
public class DrawChessBoard {
    //1.自定义二维数组棋盘
    public static String[][] chessBoard = new String[16][16];
    static final int CHESSBLOCK = 16;
    //2.自定义成员方法，显示棋盘的横纵坐标，并绘制棋盘
    void show(){
        //棋盘的横纵坐标第一格为空
        System.out.print("\t");
        for (int i = 0 ; i < CHESSBLOCK ; i++)
        {
            System.out.print(Integer.toHexString(i) + "\t");
        }
        System.out.println(" ");
        for (int i =0 ; i < CHESSBLOCK ; i++)
        {
            System.out.print(Integer.toHexString(i) + "\t");
            for (int j = 0 ; j < CHESSBLOCK ; j++)
            {
                chessBoard[i][j] = "+";
                System.out.print(chessBoard[i][j] + "\t");
            }
            System.out.println(" ");
        }
    }
}
